<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>


    <script>
        // 增加年龄
        var age;
        age = prompt('你现在多少岁?');//输出的值为字符串
        // 利用Number把字符型转换成数字型
        console.log('据我估计,五年后,你肯能' + (Number(age) + 5) + '岁了');
        alert(`据我估计,五年后,你肯能${Number(age) + 5}岁了`);
    </script>
</head>

<body>

</body>

</html>